From 99e8b92b6afcdfd99966719cced69355ce34313b Mon Sep 17 00:00:00 2001 From: Mattthias Clasen Date: Sun, 29 Apr 2007 18:03:35 +0000 Subject: [PATCH] Don't leak a file descriptor, and don't make the error dialog modal. 2007-04-29 Mattthias Clasen * gtk/gtkprintoperation-unix.c (_gtk_print_operation_platform_backend_launch_preview): Don't leak a file descriptor, and don't make the error dialog modal. (#421985, Morten Welinder) svn path=/trunk/; revision=17708 --- ChangeLog | 7 +++++++ gtk/gtkprintoperation-unix.c | 5 ++--- 2 files changed, 9 insertions(+), 3 deletions(-) diff --git a/ChangeLog b/ChangeLog index f27abba62c..98f652bec1 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,10 @@ +2007-04-29 Mattthias Clasen + + * gtk/gtkprintoperation-unix.c + (_gtk_print_operation_platform_backend_launch_preview): + Don't leak a file descriptor, and don't make the error + dialog modal. (#421985, Morten Welinder) + 2007-04-29 Xan Lopez * docs/faq/gtk-faq.sgml: Fix typo in FAQ (#373706, diff --git a/gtk/gtkprintoperation-unix.c b/gtk/gtkprintoperation-unix.c index c65cfa5070..d254c5ffed 100644 --- a/gtk/gtkprintoperation-unix.c +++ b/gtk/gtkprintoperation-unix.c @@ -212,8 +212,6 @@ _gtk_print_operation_platform_backend_launch_preview (GtkPrintOperation *op, if (!gtk_print_settings_to_file (print_settings, settings_filename, &error)) goto out; - close (fd); - settings = gtk_settings_get_for_screen (screen); g_object_get (settings, "gtk-print-preview-command", &preview_cmd, NULL); @@ -235,6 +233,8 @@ _gtk_print_operation_platform_backend_launch_preview (GtkPrintOperation *op, g_strfreev (argv); out: + close (fd); + if (error != NULL) { GtkWidget *edialog; @@ -245,7 +245,6 @@ _gtk_print_operation_platform_backend_launch_preview (GtkPrintOperation *op, _("Error launching preview") /* FIXME better text */); gtk_message_dialog_format_secondary_text (GTK_MESSAGE_DIALOG (edialog), "%s", error->message); - gtk_window_set_modal (GTK_WINDOW (edialog), TRUE); g_signal_connect (edialog, "response", G_CALLBACK (gtk_widget_destroy), NULL); -- 2.30.2